﻿#ifndef TRAININGREPORT_H
#define TRAININGREPORT_H

#include <QWidget>
#include <QtCharts>
#include "newuser.h"
#include "userDataFormate.h"
namespace Ui {
class TrainingReport;
}

class TrainingReport : public QWidget
{
    Q_OBJECT

public:
    explicit TrainingReport(QWidget *parent = nullptr);
    ~TrainingReport();
public:
    //type-1 生成  2-查看
    void  setReportData(const ST_TrainReport&,int type,QList<QPointF> &pointList);

	ST_TrainReport getReportDataByStartTime(QString reportDateStr);
private slots:
    void on_noSave_pushButton_clicked();

    void on_save_pushButton_clicked();
	void on_confirm_pushButton_clicked();
protected:
    void paintEvent(QPaintEvent *event);
    virtual void changeEvent(QEvent* event);
private:
    void trainAngleChart(const QList<QPointF> &pointList);
private:
    Ui::TrainingReport *ui;
    ST_TrainReport m_st_trainReport;

    QValueAxis *m_axisX;
    QValueAxis *m_axisY;
    QChart *m_chart;
    QChartView *m_chartview;
    QList<QPoint> m_listpoint;
    int m_currentUserId;        //当前用户ID
    newUser m_newUser;  //选择用户
    ST_EvaluateData st_evaluateData;


};

#endif // TRAININGREPORT_H
